package stardust.core.datatype;


import stardust.core.support.BitUtils;


public class Bit
{

  private byte bit;

  public Bit()
  {
  }

  public Bit(byte b)
  {
    this.setBit(b);
  }

  public Bit(byte b, int offset)
  {
    this.setBit(b, offset);
  }

  public void setBit(int b)
  {
    this.bit = (byte) b;
  }

  public void setBit(byte b)
  {
    this.bit = b;
  }

  public void setBit(byte b, int offset)
  {
    this.bit = BitUtils.byteToBit(b)[offset];
  }

  public byte getBit()
  {
    return this.bit;
  }

}
